package cn.tedu_two;

import jdk.nashorn.internal.ir.WhileNode;

public class Test2 {
    public static void main(String[] args) {
        A a=new A();
        A a1=new A();
        A a2=new A();
        A a3=new A();
        a.start();
        a1.start();
        a2.start();
        a3.start();

    }
}
class A extends Thread{
    static  int a=100;
    @Override
    public void run(){
        while(true){
            if(a>0){
                try {
                    Thread.sleep(10);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                System.out.println(super.getName()+"~~~"+a);
            }else{
                break;
            }
            a--;
        }
    }
}